<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>简介</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="book.yaconf.html">« Yaconf</a></li>
      <li style="float: right;"><a href="yaconf.setup.html">安装/配置 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.yaconf.html">Yaconf</a></li>
    <li>简介</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="intro.yaconf" class="preface">
  <h1 class="title">简介</h1>
  <p class="para">
   <code class="literal">Yet Another Configurations Container</code>
   (<abbr>Yaconf</abbr>) is a configurations container, 
   it parses INI files, and store the result
   in PHP when PHP is started, the result lives with the
   whole PHP lifecycle.
  </p>
  <p class="para">
   Yaconf stores all configurations as 
   interned string or immutable array, which means they are 
   not refcounted-able, thus when you retrieving configurations
   from yaconf, it could be considered as zero-copy, very fast. 
  </p>
  <p class="para">
   Yaconf supports sections and sections
   inheritance in INI files. if PHP is built as non-ZTS build,
   Yaconf also supports automatically reloading after INI files
   are changed.
  </p>
  <p class="para">
   Yaconf requires PHP 7.0 or greater.
  </p>
  <div class="example" id="example-3947">
   <p><strong>示例 #1 INI example</strong></p>
   <div class="example-contents">
<div class="inicode"><pre class="inicode">;simple key val
key=val
;hash
hash.a=val
;array
arr.0=val
;or
arr[]=val
;use PHP constants
version=PHP_VERION
;use environment
env=${PATH}</pre>
</div>
   </div>

  </div>
  <div class="example" id="example-3948">
   <p><strong>示例 #2 INI sections example</strong></p>
   <div class="example-contents">
<div class="inicode"><pre class="inicode">[SectionA]
key=val
hash.a=val

;SectionB inherits SectionA
[SectionB:SectionA]
;override configuration key in SectionA
key=new_val</pre>
</div>
   </div>

  </div>
 </div></div></div></body></html>